<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
import Edit from "./../edit/index";
export default {
  mixins: [
    Vue.prototype.$vFN.Mixins.Base,
    Vue.prototype.$vFN.Mixins.Page,
    Vue.prototype.$vFN.Mixins.Table,
  ],
  data() {
    return {
      appWindow: window,
      // 页面接口地址
      apiUrl: {
        list: "store/withdraw/index?pageNum=1&pageSize=20",
        delete: "store/withdraw/del",
      },
      // 表格查询数据
      mixinTable_tableSearchData: {},
      amount: "",
   
      // 表格数据删除展示结构
      tableDeleteConfig: {
        columns: [
          {
            label: "收款帐户名",
            prop: "real_name",
            // type: "img",
          },
          {
            label: "申请提现金额",
            prop: "amount",
          },
        ],
      },
      // 表格数据类型
      mixinTable_tableDataType: "tree",
    };
  },
  methods: {
    // 打开添加/修改
    async editBoxOpen(params_) {
      Edit.init({
        mixinEdit_parent: this,
        mixinEdit_editType: params_.type,
        id: params_.id,
        amount: this.amount,
      });
    },
    // 初始化
    async init() {

      // 获取可提现金额
      let res = await this.$vFN.Http.post({
          url: "store/withdraw/usable",
      }, window);
      this.amount = res.data.usable;
      this.mixinTable_refreshData();
    },
  },
  mounted() {
    this.init();
  },
  activated() {},
};
</script>